#include<iostream>
using namespace std;

class CVector
{
private:
    int *data;
    int n;
public:
    CVector()
    {
        n=5;
        data=new int[n];
        for(int i=0;i<n;i++)
        {
            data[i]=i;
            //cout<<data[i]<<endl;
        }
    }
    CVector(int n1,int *a)
    {
        n=n1;
        data=a;
    }
    void print()
    {
        int i;
        for(i=0;i<n-1;i++)
        {
            //cout<<i<<endl;
            cout<<data[i]<<" "; 
        }
        cout<<data[i]<<endl;  
    }
    ~CVector(){};
};

int main()
{
    CVector p1;
    int n;
    cin>>n;
    int *a=new int[n];
    //int a[n];
    for(int i=0;i<n;i++)
    {
        cin>>a[i];
    }
    CVector p2(n,a);
    p1.print();
    p2.print();
    return 0;
}